<?php
    // 接收前端发送的数据
    $n =@$_GET["name"];
    $e =@$_GET["emali"];
    $T =@$_GET["tel"];
    $t = @$_GET["textarea"];
    echo"后台".$n."-----".$t;
    $link = mysqli_connect("localhost","root","root","sy2002");
    if(!$link){
        $msg = array("msg"=>mysqli_connect_error);
        die(json_encode($msg));
    }else{
        echo "1";
    };
    
    $sql = "INSERT  liuyan (name,email,tel,textarea) VALUES('".$n."','".$e."','".$T."','".$t."')";
    $res = mysqli_query($link, $sql);   
    if($res){
        
        $row = mysqli_fetch_assoc($res);

    }else{
        die("连接错误" . mysqli_error());
    };
    
?>